//
//  ShowOrderVC.m
//  Courses
//
//  Created by YiXuePxh on 15/4/23.
//  Copyright (c) 2015年 boyibang. All rights reserved.
//

#import "ShowOrderVC.h"
#import "WTFColors.h"
@interface ShowOrderVC ()
@property (weak, nonatomic) IBOutlet UILabel *stateLabel;
@property (weak, nonatomic) IBOutlet UILabel *orderNo;
@property (weak, nonatomic) IBOutlet UILabel *dealLabel;
@property (weak, nonatomic) IBOutlet UILabel *realMount;
@property (weak, nonatomic) IBOutlet UILabel *disMount;
@property (weak, nonatomic) IBOutlet UIView *backView;
@property (weak, nonatomic) IBOutlet UILabel *dataLabel;
@property (weak, nonatomic) IBOutlet UILabel *moble;
@property (weak, nonatomic) IBOutlet UILabel *scaleLabel;
@property (weak, nonatomic) IBOutlet UILabel *invoiceTitle;
@property (weak, nonatomic) IBOutlet UILabel *invoiceAdress;
@property (weak, nonatomic) IBOutlet UILabel *CouponLabel;

@end

@implementation ShowOrderVC

-(instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.title = @"订单详情";
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    NSString* statusString;
    int status = [_course.orderStatus intValue];
    switch (status) {
        case 0:
            statusString = @"待支付";
            break;
        case 1:
            statusString = @"已关闭";
            break;
        case 2:
            statusString = @"部分已退款退课";
            break;
        case 3:
            statusString = @"已退货退课";
            break;
        case 4:
            statusString = @"金额不匹配";
            break;
        case 5:
            statusString = @"部分支付";
            break;
        case 6:
            statusString = @"已支付成功";
            break;
        case 7:
            statusString = @"已生效";
            break;
        default:
            break;
    }
    _stateLabel.text = [NSString stringWithFormat:@"状态:%@",statusString];
    _orderNo.text = [NSString stringWithFormat:@"订单编号:%@",_course.orderNo];
    _dealLabel.text = [NSString stringWithFormat:@"提交时间:%@",_course.orderTime];
    _realMount.text = [NSString stringWithFormat:@"实付金额:%@",_course.realAmount];
    _disMount.text = [NSString stringWithFormat:@"班级名称:%@",_course.className];
    _backView.backgroundColor = [WTFColors defaultBarColor];
    _dataLabel.text = [NSString stringWithFormat:@"%@",_course.className];
    _scaleLabel.text = [NSString stringWithFormat:@"课程顾问:"];
    _moble.text = [NSString stringWithFormat:@"手机号码:%@",[User currentUser].mobile];
    _invoiceTitle.text = [NSString stringWithFormat:@"发票抬头:"];
    _invoiceAdress.text = [NSString stringWithFormat:@"发票地址:"];
    _CouponLabel.text = [NSString stringWithFormat:@"优惠券码:"];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
